package com.kung.qvs.ui.main.fragment;

import androidx.annotation.NonNull;
import androidx.databinding.ObservableField;

import com.kung.qvs.entity.GarbageTypeBean;
import com.kung.qvs.entity.ProductBean;
import com.kung.qvs.entity.ProductInfoBean;

import me.goldze.mvvmhabit.base.ItemViewModel;
import me.goldze.mvvmhabit.binding.command.BindingAction;
import me.goldze.mvvmhabit.binding.command.BindingCommand;

public class MainTrashItemViewModel extends ItemViewModel<MainViewModel> {

    public ObservableField<ProductBean> entity = new ObservableField<>();

    public MainTrashItemViewModel(@NonNull MainViewModel viewModel, ProductBean garbageTypeBean) {
        super(viewModel);
        this.entity.set(garbageTypeBean);
    }

    public BindingCommand itemClick = new BindingCommand(new BindingAction() {
        @Override
        public void call() {
            //这里可以通过一个标识,做出判断，已达到跳入不同界面的逻辑
            viewModel.setGarbageTypeSelectState(entity.get(), true);
        }
    });
}
